<?php
my_component_load('testing' , false);
my_component_load('paging' , false);
my_component_load('konfigurasi_konstanta');
my_component_load('data_setting', false);
$task = isset($_GET['task']) ? $_GET['task'] : ""; 
$modulname = "Admin _BN_ Konfigurasi Data _BN_ Konstanta";

if($_SERVER['REQUEST_METHOD'] == 'POST' ){
	$validate = validasi_konstanta();
	if($validate){
		$errors = message_multi_error($validate);		 
		$view = $errors .form_konstanta();
		$pagename = "Entry";
	}else{
		submit_konstanta();
		my_direct('index.php?com=konfigurasi_konstanta');
	}
}else{
	if($task== 'edit'){
		$pagename = "Edit";
		load_facebox_script();
		$view =  form_konstanta(); 	
	}else{
		$view = list_konstanta();
		$pagename = "Daftar Konstanta";
	}
}

$content = spliter_browser( $view , $pagename ,'index.php?com=konfigurasi_konstanta&task=edit_konstanta');
generate_my_web($content, $modulname );		

?>